<?php


namespace app\blog\controller\v1;


use app\BaseController;
use app\blog\model\TagModel;

class Tag extends BaseController
{
    /**
     * 获取所有的Tag
     * @return \think\response\Json
     * @throws \think\db\exception\DbException
     */
    public function getTagList() {
        $model = new TagModel();
        $result =  $model->where('status', '=', 1)->select();
        if ($result) {
            return successJson($result, "success");
        }
        return errorJson(60004, "error");
    }
}